package com.exam.controller;


import com.exam.entity.Replay;
import com.exam.service.IReplayService;
import com.exam.service.impl.ReplayServiceImpl;
import com.exam.util.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 回复表 前端控制器
 * </p>
 *
 * @author zyh
 * @since 2023-03-09
 */
@RestController
@RequestMapping("/replay")
public class ReplayController {

    @Autowired
    private IReplayService iReplayService;

    @PostMapping
    public RespBean add(@RequestBody Replay replay) {
        iReplayService.save(replay);
        return RespBean.success("评论成功");
    }

}
